<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文档管理</title>
<link rel="stylesheet" type="text/css" href="../img/base.css">
<script language="javascript">
    function upgrade(aid)
    {
	if(aid == 0)
	{
		alert('请选择用户！');
		return false;
	}

	location = "admin_act.php?action=upgrade&aid="+aid;
    }

    function delprivi(aid)
    {
	    if(aid == 0)
	    {
		    alert('请选择用户！');
		    return false;
	    }
	    location = "admin_act.php?action=delprivi&aid="+aid;
    }

    /**
    * 取得管理员的信息
    */
    function getinfo(aid)
    {	
	     if(aid == 0)
	    {
		    alert('请选择用户！');
		    return false;
	    }
	    location = "admin_info.php?action=getinfo&aid="+aid;
    }
    
    /**
    * 给客理员授权的信息
    */  
    function warrant(aid) {
	  if(aid == 0)
	  {
		    alert('请选择用户！');
		    return false;
	  }

	  location = "admin_info.php?action=warrant&aid="+aid;
    }
</script>
</head>
<body leftmargin="8" topmargin="8" background='../img/allbg.gif'>
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
            <tr>
		<td align='center' valign='top'>
                    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                        <tr>
                            <td height="26" background="../img/newlinebg3.gif">
                                <table width="98%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td align="right">
                                                <input type='button' class="coolbg np" onClick="location='admin_info.php?action=add';" value='添加管理员' />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                       </tr>
                    </table>
			
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr bgcolor="#FFFFFF">
                             <td height="4"></td>
                           </tr>
                    </table>
                
                     <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                          <tr>
                               <td height="26" background="../img/tbg.gif">
                                  <form action="" method="post">
                                        <table width="98%" border="0" cellspacing="2" cellpadding="0">
                                                <tr>
                                                      <td  colspan="4" align="center">
                                                          用户名：<input type='text' name='userid' id="userid" value="<{$userid}>" />
                                                                 <input type="hidden" name="op" value="search" />
                                                                 <input type='submit' class="coolbg np" value='搜索' />
                                                      </td>
                                               </tr> 
                                        </table>
                                    </form>
                              </td>
                         </tr>
                     </table>
            
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr bgcolor="#FFFFFF">
                            <td height="4"></td>
                        </tr>
                    </table>

                    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA">
                        <tr bgcolor="#E7E7E7">
                            <td height="24" colspan="9" align="left" background="../img/tbg.gif">
                                §管理员管理 &gt; 管理员列表&nbsp;
                            </td>
                        </tr>
                        <tr align="center" bgcolor="#FAFAF1" height="22">
                            <td width="6%">ID</td>
                            <td width="8%">用户名</td>
                            <td width="8%">真实姓名</td>
							<td width="8%">负责地区</td>
                            <td width="8%">状态</td>
                            <td width="8%">最后登录时间</td>
                            <td width="10%">操作</td>
                        </tr>
                        <{foreach item=adminIndex from=$adminIndexList}>
                            <tr align='center' bgcolor="#FFFFFF"  onMouseMove="javascript:this.bgColor='#f4fbf4';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
                                <td align='left'>&nbsp;&nbsp;<{$adminIndex.admin_id}></td>
                                <td align='left'>&nbsp;&nbsp;<{$adminIndex.admin_name}></td>
                                <td align='left'>&nbsp;&nbsp;<{$adminIndex.real_name}></td>
								<td align='left'>&nbsp;&nbsp;<{$adminIndex.districes}></td>
                                <td>
                                    <{if $adminIndex.is_available != 1}>
                                         已禁用
                                    <{else}>
                                         已启用
                                    <{/if}>
                                </td>
                                <td><{$adminIndex.login_time}></td>
                                <td>
                                    <{if $adminIndex.is_available != 1}>
                                    <a href="javascript:upgrade(<{$adminIndex.admin_id}>)">启用</a>
                                    <{else}>
                                    <a href="javascript:delprivi(<{$adminIndex.admin_id}>)">禁用</a>
                                    <{/if}>       
				    | 
				    <a href="javascript:warrant(<{$adminIndex.admin_id}>)">授权</a> |
				    <a href="javascript:getinfo(<{$adminIndex.admin_id}>)">编辑</a>
                                </td>
                            </tr>
                        <{/foreach}>                
                        <tr bgcolor="#FAFAF1">
                            <td height="24" colspan="12">&nbsp;&nbsp;<{$page_str}></td>
                        </tr>
                    </table>

                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="4"></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                                <td height="26"></td>
                        </tr>
                        <tr>
                                <td colspan="2" height="4"></td>
                        </tr>
                    </table>
                </td>
            </tr>
     </table>
</body>
</html>